//先引入一级路由
import Layout from '@/views/Layout.vue'

//引入二级路由
import Index from '@/views/Index.vue'
import Find from '@/views/Find.vue'
import Consult from '@/views/Consult.vue'
import My from '@/views/My.vue'

import Details from '@/views/Find-details.vue'

const routes = [
  {
    path: '/',
    component: Layout,
    redirect: '/index',
    children: [
      {
        name: 'index',
        path: 'index',
        component: Index,
      },
      {
        name: 'find',
        path: 'find',
        component: Find,
      },
      {
        name: 'consult',
        path: 'consult',
        component: Consult,
      },
      {
        name: 'my',
        path: 'my',
        component: My,
      },
    ],
  },
  {
    name: 'finddetails',
    path: '/finddetails',
    component: Details,
  },
]
export default routes
